Skip to content

Fix dashboard editor slot removal handling#680

Merged
multiplex55 merged 3 commits intomasterfrom
codex/fix-removal-logic-in-dashboard-editor
Jan 13, 2026
Merged

Fix dashboard editor slot removal handling#680
multiplex55 merged 3 commits intomasterfrom
codex/fix-removal-logic-in-dashboard-editor

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Prevent cascading deletions when confirming a slot removal in the dashboard editor UI loop.
  • Ensure the pending confirmation is cleared after a confirmed removal so the same index is not reused.
  • Advance the loop index after removing a slot to avoid reading a stale idx into the shortened slots vector.
  • Limit removals to one slot per UI frame to avoid accidental multi-deletes.

Description

  • Added a local removed_once guard and changed the removal condition to let removed = !removed_once && confirm_remove == Some(idx);.
  • After removing a slot via self.config.slots.remove(idx), set removed_once = true and clear both self.confirm_remove_slot and the local confirm_remove.
  • Increment idx in the removal branch so the while-loop progresses safely and does not reuse a stale index.
  • Changes applied in src/gui/dashboard_editor_dialog.rs.

Testing

  • No automated tests were run for this change.

Codex Task

@multiplex55 multiplex55 merged commit 2b5b90f into master Jan 13, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/fix-removal-logic-in-dashboard-editor branch January 13, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant